import React from 'react'
import { Modal } from 'antd'
import { TwsReactMarkdownPreview } from 'tws-antd'
import { FormattedMessage } from 'react-intl'

const CommentModal = ({userName, commentModalVisible, content, handleCancel}) => {
  return <Modal
    title={userName}
    centered
    footer={null}
    width={800}
    visible={commentModalVisible}
    onCancel={handleCancel}
  >
    {content
      ? <TwsReactMarkdownPreview source={content} />
      : <FormattedMessage id='暂无评价' />
    }

  </Modal>
}

export default CommentModal
